{include file="public_head"}
<style>
  #sub{
    width: 250px;
    line-height: 48px;
    font-size: 18px;
    background: #E43C3F;
    border: none;
    outline: none;
    border-radius: 6px;
    margin: 50px auto 0;
    display: block;
    color: white;
  }
</style>
{include file="public_menu"}
  <div class="content_center">
    <div class="main_center">
      <div class="main_left left">
        {include file="public_information_menu"}
      </div>
      <div class="main_right right">
        <div class="main_right_title">佣金转到余额<span class="right"></span></div>
        <div class="integral_con">
          <div class="center-cash">
            <div class="balance">
              <div class="main">
                <div class="left">
                  <img class="qianbi" src="__STATIC__/img/tixian.png">
                  <span class="yue">可提现金额（元）</span>
                  <h4 class="price">{$brokerage.actual_amount}元</h4>
                </div>
                <div class="left" style="float: right;">
                  <img class="qianbi" src="__STATIC__/img/logo25.jpg">
                  <span class="yue">钱包余额（元）</span>
                  <h4 class="price">{$data}元</h4>
                </div>
              </div>
            </div>
            <form action="" method="post" id="rechage">
            <div class="cash">
              <div>
                <h4>提现金额</h4>
                <input type="text" placeholder="提现金额需大于1.00元" class="text" name="price" datatype="price" nullmsg="请输入提现金额！" errmsg="提现金额错误">
              </div>
              <input type="button" value="提现" id="sub">
            </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
<script>
  // 佣金提现到余额
  $(function () {
    $.Tipmsg.r = null;
    $.Tipmsg.p = null;
    $.Datatype.price = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
    // ajax提交
    $("#rechage").Validform({
      tiptype: function (msg) {
        layer.msg(msg, {icon: 2});
      },
      btnSubmit: '#sub',
      tipSweep: true,
      ajaxPost: true,
      // 回调函数
      callback: function (t) {
        if (t.code == 200) {
          layer.msg(t.message, {icon: 1})
          location.reload();
        } else {

          layer.msg(t.message);
        }
      }
    });
  });

</script>
{include file="public_foot"}
